package com.song.mall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.song.common.to.mq.SeckillOrderTo;
import com.song.common.utils.PageUtils;
import com.song.mall.order.entity.OrderEntity;
import com.song.mall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author Songchao
 * @email 2364043569@qq.com
 * @date 2021-08-07 22:04:14
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);


    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;


    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);


    OrderEntity getOrderByOrderSn(String orderSn);


    void closeOrder(OrderEntity entity);


    /**
     * 获取当前订单的支付信息
     */
    PayVo getOrderPay(String orderSn);


    PageUtils queryPageWithItem(Map<String, Object> params);


    String handlePayResult(PayAsyncVo vo);


    void createSeckillOrder(SeckillOrderTo seckillOrder);
}

